<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
    <title id="bv20941">DROP FOREIGN DATA WRAPPER</title>
    <body>
        <p id="sql_command_desc">Removes a foreign-data wrapper.</p>
        <section id="section2">
            <title>Synopsis</title>
            <codeblock id="sql_command_synopsis">DROP FOREIGN DATA WRAPPER [ IF EXISTS ] <varname>name</varname> [ CASCADE | RESTRICT ]</codeblock>
        </section>
        <section id="section3">
            <title>Description</title>
            <p><codeph>DROP FOREIGN DATA WRAPPER</codeph> removes an existing foreign-data wrapper
                from the current database.  A foreign-data wrapper may be removed only by 
                 its owner.</p>
        </section>
        <section id="section4">
            <title>Parameters</title>
            <parml>
                <plentry>
                    <pt>IF EXISTS</pt>
                    <pd>
                        <p>Do not throw an error if the foreign-data wrapper does not exist. Greenplum Database issues a notice in this case.</p>
                    </pd>
                </plentry>
                <plentry>
                    <pt><varname>name</varname></pt>
                    <pd>
                        <p>The name of an existing foreign-data wrapper.</p>
                    </pd>
                </plentry>
                <plentry>
                    <pt>CASCADE</pt>
                    <pd>
                        <p>Automatically drop objects that depend on the foreign-data wrapper (such as servers).</p>
                    </pd>
                </plentry>
                <plentry>
                    <pt>RESTRICT</pt>
                    <pd>
                        <p>Refuse to drop the foreign-data wrapper if any object depends on it. This is the default.</p>
                    </pd>
                </plentry>
            </parml>
        </section>
        <section id="section6">
            <title>Examples</title>
            <p>Drop the foreign-data wrapper named <codeph>dbi</codeph>:</p><codeblock>DROP FOREIGN DATA WRAPPER dbi;</codeblock>
        </section>
        <section id="section7">
            <title>Compatibility</title>
            <p><codeph>DROP FOREIGN DATA WRAPPER</codeph> conforms to ISO/IEC 9075-9 (SQL/MED). The <codeph>IF EXISTS</codeph> clause is a Greenplum Database extension.</p>
        </section>
        <section id="section8">
            <title>See Also</title>
            <p><codeph><xref href="CREATE_FOREIGN_DATA_WRAPPER.xml#topic1">CREATE FOREIGN DATA WRAPPER</xref></codeph>,
                        <codeph><xref href="ALTER_FOREIGN_DATA_WRAPPER.xml#topic1">ALTER
                    FOREIGN DATA WRAPPER</xref></codeph></p>
        </section>
    </body>
</topic>
